package opn.srn.command.load.parser;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class RecordMetaData {
	String name;
	Map<String, String> parameters = new HashMap<String, String>();
	List<RecordMetaData> members;

	public RecordMetaData(String name) {
		this.name = name;
	}

	public void addParameter(String name, String value) {
		parameters.put(name, value);
	}

	public void addMember(RecordMetaData recordMetaData) {
		if (members == null) {
			members = new ArrayList<RecordMetaData>();
		}

		members.add(recordMetaData);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Map<String, String> getParameters() {
		return parameters;
	}

	public void setParameters(Map<String, String> parameters) {
		if (parameters == null) {
			this.parameters = new HashMap<String, String>();
		} else {
			this.parameters = parameters;
		}
	}

	public List<RecordMetaData> getMembers() {
		return members;
	}

	public void setMembers(List<RecordMetaData> members) {
		this.members = members;
	}

}
